package cn.zwx.activiti.example.service;

import cn.zwx.activiti.example.model.req.*;
import cn.zwx.activiti.example.model.resp.QueryInstancesListResp;
import cn.zwx.activiti.example.model.resp.QueryVariablesResp;
import cn.zwx.activiti.example.model.resp.StartProcessResp;
import org.activiti.api.runtime.shared.query.Page;

import java.util.List;

/**
 * @description:
 * @projectName:activiti-example
 * @see:cn.zwx.activiti.example.service
 * @author:zhangwenxue
 * @createTime:2021/5/30 0:03
 * @version:1.0
 */
public interface ProcessInstanceService {
    /**
     * @description 启动流程实例
     * @return cn.zwx.activiti.example.model.resp.StartProcessResp
     * @author zhangwenxue
     * @createTime 2021/6/1 22:05
     **/
    StartProcessResp startProcess(StartProcessReq req);
    /**
     * @description 获取流程实例列表
     * @return org.activiti.api.runtime.shared.query.Page<cn.zwx.activiti.example.model.resp.QueryInstancesListResp>
     * @author zhangwenxue
     * @createTime 2021/6/1 23:25
     **/
    Page<QueryInstancesListResp> getInstancesList(QueryInstancesListReq req);
    /**
     * @description 流程挂起
     * @return void
     * @author zhangwenxue
     * @createTime 2021/6/2 20:33
     **/
    void suspendInstance(SuspendInstanceReq req);
     /**
      * @description 流程激活
      * @return void
      * @author zhangwenxue
      * @createTime 2021/6/2 20:40
      **/
    void resumeInstance(ResumeInstanceReq req);
    /**
     * @description 获取流程实例参数
     * @return java.util.List<cn.zwx.activiti.example.model.resp.QueryVariablesResp>
     * @author zhangwenxue
     * @createTime 2021/6/2 20:49
     **/
    List<QueryVariablesResp> variables(QueryVariablesReq req);
    /**
     * @description 删除流程实例
     * @return void
     * @author zhangwenxue
     * @createTime 2021/6/2 21:02
     **/
    void deleteInstance(DeleteInstanceReq req);
}
